//
//  DetailsTableViewCell.m
//  A_HandHeldLOL
//
//  Created by Zhao YanBin on 16/1/19.
//  Copyright © 2016年 zhaoyanbin. All rights reserved.
//

#import "DetailsTableViewCell.h"

@implementation DetailsTableViewCell

-(void)dealloc
{
    [_baikuang release];
    [_time release];
    [_saishi release];
    [_teamalogo release];
    [_teamaname release];
    [_teamblogo release];
    [_teambname release];
    [_bifen release];
    [super dealloc];
}

-(instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        self.baikuang = [[UIImageView alloc] init];
        _baikuang.image = [UIImage imageNamed:@"baikuang"];
        [self.contentView addSubview:_baikuang];
        
        self.time = [[UILabel alloc] init];
        _time.backgroundColor = [UIColor redColor];
        [self.baikuang addSubview:_time];
        
        self.saishi = [[UILabel alloc] init];
        _saishi.backgroundColor = [UIColor yellowColor];
        [self.baikuang addSubview:_saishi];
        
        self.teamaname = [[UILabel alloc] init];
        _teamaname.backgroundColor = [UIColor greenColor];
        [self.baikuang addSubview:_teamaname];
        
        self.teambname = [[UILabel alloc] init];
        _teambname.backgroundColor = [UIColor greenColor];
        [self.baikuang addSubview:_teambname];
        
        self.teamalogo = [[UIImageView alloc] init];
        _teamalogo.backgroundColor = [UIColor blackColor];
        [self.baikuang addSubview:_teamalogo];
        
        self.teamblogo = [[UIImageView alloc] init];
        _teamblogo.backgroundColor = [UIColor blackColor];
        [self.baikuang addSubview:_teamblogo];
        
        self.bifen = [[UILabel alloc] init];
        _bifen.backgroundColor = [UIColor blueColor];
        [self.baikuang addSubview:_bifen];
        
        self.guankan = [UIButton buttonWithType:UIButtonTypeCustom];
        [_guankan setTitle:@"观看视频" forState:UIControlStateNormal];
//        [_guankan addTarget:self action:@selector(guankan:) forControlEvents:UIControlEventTouchUpInside];
        [self.baikuang addSubview:_guankan];
        _guankan.backgroundColor = [UIColor blueColor];

    }
    return self;
}




-(void)layoutSubviews
{
    [super layoutSubviews];
    _baikuang.frame = CGRectMake(10, 0, self.contentView.frame.size.width - 20, self.contentView.frame.size.height - 10);
    _time.frame = CGRectMake(70, 0, self.contentView.frame.size.width - 140, 30);
    _saishi.frame = CGRectMake(70, 30, self.contentView.frame.size.width - 140, 30);
    _teamaname.frame = CGRectMake(80, 60, 40, 30);
    _teamalogo.frame = CGRectMake(120, 60, 40, 40);
    _bifen.frame = CGRectMake(160, 60, 40, 30);
    _teamblogo.frame = CGRectMake(200, 60, 40, 40);
    _teambname.frame = CGRectMake(240, 60, 40, 30);
    _guankan.frame = CGRectMake(140, 100, 80, 30);
}


- (void)awakeFromNib {
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
